package com.pai4j.remote.aigc;



import com.pai4j.common.bean.PAIResponseBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "pai4j-aigc-service",
             contextId = "basicModelServiceClient")
public interface BasicModelServiceClient {

    /**
     * 单个字符串embedding
     *
     * @param text
     * @return
     */
    @PostMapping("/aigc-service/basic/ai/embedding/text")
    PAIResponseBean<float[]> embed(@RequestBody String text);

    /**
     * 批量字符串embedding
     *
     * @param texts
     * @return
     */
    @PostMapping("/aigc-service/basic/ai/embedding/texts")
    PAIResponseBean<List<float[]>> embed(@RequestBody List<String> texts);
}
